Skip to content

Ignore the free-threaded Windows build output directories#154641

Merged
StanFromIreland merged 1 commit into
python:mainfrom
gianghungtien:gitignore-freethreaded-build-dirs
Jul 25, 2026
Merged

Ignore the free-threaded Windows build output directories#154641
StanFromIreland merged 1 commit into
python:mainfrom
gianghungtien:gitignore-freethreaded-build-dirs

Conversation

@gianghungtien

Copy link
Copy Markdown
Contributor

Split out of #154586 at @zooba's suggestion.

PCbuild/python.props gives free-threaded builds their own output directories, one per platform:

<BuildPath32t Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\win32t\</BuildPath32t>
<BuildPath32t Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\win32t\</BuildPath32t>
<BuildPath64t Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\amd64t\</BuildPath64t>
<BuildPath64t Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\amd64t\</BuildPath64t>
<BuildPathArm32t Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\arm32t\</BuildPathArm32t>
<BuildPathArm32t Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\arm32t\</BuildPathArm32t>
<BuildPathArm64t Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\arm64t\</BuildPathArm64t>
<BuildPathArm64t Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\arm64t\</BuildPathArm64t>

.gitignore lists the four GIL-enabled directories (win32/, amd64/, arm32/, arm64/) but none of the t counterparts, so PCbuild\build.bat --disable-gil leaves its entire output — .pdb, .lib, .exp, pybuilddir.txt, the copied LICENSE.txt, and so on — showing up as untracked files. That is easy to sweep into a commit by accident, which is exactly what happened in #154586.

This adds the four missing entries, keeping the list alphabetical.

Verified against a real -p x64 -c Release --disable-gil build tree:

$ git check-ignore -v --no-index PCbuild/amd64t/python.exe PCbuild/win32t/_freeze_module.pdb
.gitignore:127:PCbuild/amd64t/	PCbuild/amd64t/python.exe
.gitignore:134:PCbuild/win32t/	PCbuild/win32t/_freeze_module.pdb

git status is clean afterwards, where it previously listed 140 build artifacts. arm32t/ and arm64t/ are included for symmetry with the props file; I have no ARM machine to build on, so those two are matched by inspection rather than by test.

No behaviour change, so this needs the skip news label.

PCbuild/python.props places free-threaded builds in win32t, amd64t, arm32t
and arm64t, but only the GIL-enabled counterparts (win32, amd64, arm32,
arm64) were listed in .gitignore, so a --disable-gil build leaves its
output visible to git.
@StanFromIreland StanFromIreland added the infra CI, GitHub Actions, buildbots, Dependabot, etc. label Jul 25, 2026
@StanFromIreland
StanFromIreland merged commit 587d0d1 into python:main Jul 25, 2026
59 checks passed
@StanFromIreland StanFromIreland added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 25, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @gianghungtien for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 25, 2026

Copy link
Copy Markdown

GH-154694 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 25, 2026
StanFromIreland pushed a commit that referenced this pull request Jul 25, 2026
GH-154641) (#154694)

(cherry picked from commit 587d0d1)

Co-authored-by: Jason G <41053218+gianghungtien@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra CI, GitHub Actions, buildbots, Dependabot, etc. skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants